package com.biostime.dingdingbox.modules.db.service;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.biostime.dingdingbox.common.service.CrudService;
import com.biostime.dingdingbox.modules.db.dao.PraiseRecordDao;
import com.biostime.dingdingbox.modules.db.entity.PraiseRecord;

/**
 * 会员玩具关系表Service
 * @author chenweicheng
 * @version 2016-06-29
 */
@Service
@Transactional(readOnly = true)
public class PraiseRecordService extends CrudService<PraiseRecordDao, PraiseRecord> {
	public int apiRecomPraiseCount(){
		return dao.apiRecomPraiseCount();
	}
	
	public int apiStrategyPraiseCount(String strategyId , String userId){
		return dao.apiStrategyPraiseCount(strategyId , userId);
	}
	
	public PraiseRecord apiGetPraiseRecord(String type,String strategyId , String userId){
		return dao.apiGetPraiseRecord(type, strategyId, userId);
	}
	
	@Transactional(readOnly = false)
	public void apiCancelPraise(String type,String strategyId , String userId){
		dao.apiCancelPraise(type, strategyId, userId); 
	}
}
